﻿//-----------------------------------------------------------------------
// <copyright file="LoggingProvider.cs" company="CodePlex">
//     Copyright (c) Doug Holland, CodePlex. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace CodePlex.Diagnostics
{
    using System;

    using System.Security;
    using System.Security.Principal;
    
    using CodePlex.Diagnostics.Contracts;

    /// <summary>
    /// The <see cref="T:CodePlex.Diagnostics.ExceptionProvider"/> class provides backwards compatibility only, extension methods defined within the <see cref="T:CodePlex.Diagnostics.StringExtensions"/> class should be used instead.
    /// </summary>
    [Obsolete("The CodePlex.Diagnostics.ExceptionProvider class provides backwards compatibility only, extension methods defined within the CodePlex.Diagnostics.StringExtensions class should be used instead.", false)]
    public static class LoggingProvider
    {
        #region public static Guid Log(string entry, LoggingPriority priority, LoggingType type, IIdentity identity)

        /// <summary>
        /// Writes the <see cref="T:System.String"/> using the configured logging provider.
        /// </summary>
        /// <param name="entry">The <see cref="T:System.String"/> to be logged.</param>
        /// <param name="priority">The <see cref="T:CodePlex.Diagnostics.Contracts.LoggingPriority"/> of the log entry.</param>
        /// <param name="type">The <see cref="T:CodePlex.Diagnostics.Contracts.LoggingType"/> of the log entry.</param>
        /// <param name="identity">The <see cref="T:System.Security.Principal.IIdentity"/> to associate with the log entry.</param>
        /// <returns>A <see cref="T:System.Guid"/> representing the unique publication identifier for the log entry.</returns>
        [Obsolete("This method is obsolete, it has been replaced by extension methods defined within the CodePlex.Diagnostics.StringExtensions class.", false)]
        public static Guid Log(string entry, LoggingPriority priority, LoggingType type, IIdentity identity)
        {
            return entry.Log(priority, type, identity);
        }

        #endregion
    }
}